feat: implement the gnfd peer for bsc nodes block syncing from Greenfield #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Background:
As BSC blocks are archived in Greenfield by the greenfield-bsc-archiver, full historical block data can be accessed and tracked there. When BSC nodes join the network, selecting the
full
mode, The BSC wrap client serves as an interface between these nodes and Greenfield, efficiently fetching blocks from Greenfield and delivering them to peers through the BSC P2P network.Workflow:
The Greenfield peer does not participate in other operations within the BSC network, it solely provides block data to BSC nodes. It does not persist any data on its own; instead, when it receives requests (GetBodies and GetHeaders) from other BSC nodes, it fetches a bundle of blocks (# of blocks determined by the Block Archiver Service) from Greenfield and caches them in memory. This ensures the Greenfield peer delivers block data
to BSC nodes efficiently.